package com.github.kfcfans.powerjob.samples.tester;

import com.github.kfcfans.powerjob.worker.core.processor.ProcessResult;
import com.github.kfcfans.powerjob.worker.core.processor.TaskContext;
import com.github.kfcfans.powerjob.worker.core.processor.sdk.BasicProcessor;
import com.github.kfcfans.powerjob.worker.log.OmsLogger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 测试 Oms 在线日志的性能
 *
 * @author tjq
 * @since 2020/5/3
 */
@Component
@Slf4j
public class OmsLogPerformanceTester implements BasicProcessor {

    @Override
    public ProcessResult process(TaskContext context) throws Exception {
        OmsLogger omsLogger = context.getOmsLogger();
        omsLogger.info("成功执行------");
        log.info("----执行成功");
        return new ProcessResult(true, "good job");
    }
}
